<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Cookie操作</title>
</head>
<body>
<%
    Cookie[] cookies = request.getCookies(); // 获取全部的客户端发送的Cookie数据
    if (cookies != null) {
        for (Cookie cookie : cookies) { // foreach循环结构输出
%>
            <%=cookie.getName()%> = <%=cookie.getValue()%><br>
<%
        }
    } else {
%>
            <h2>对不起，本次的请求没有任何的Cookie数据！</h2>
<%
    }
%>
</body>
</html>
